Transform CastQuest monorepo to production-ready state#6
Transform CastQuest monorepo to production-ready state#6
Conversation
Co-authored-by: SMSDAO <144380926+SMSDAO@users.noreply.github.com>
…t configs Co-authored-by: SMSDAO <144380926+SMSDAO@users.noreply.github.com>
…el config Co-authored-by: SMSDAO <144380926+SMSDAO@users.noreply.github.com>
…ibe import in test Co-authored-by: SMSDAO <144380926+SMSDAO@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR aims to make the CastQuest monorepo deployable and CI-green by adding deployment config (Vercel), tightening build/lint/test tooling across workspaces, and introducing initial “production feature” scaffolding (agents framework + SDK plugin system + basic PWA assets).
Changes:
- Add Vercel deployment configuration and Turbo global env wiring for public/runtime variables.
- Implement initial Agent/Swarm framework in
packages/agentsand a hook-based plugin registry inpackages/sdk. - Add baseline testing + lint configs across packages, plus basic PWA assets and Vitest setup for
apps/web.
Reviewed changes
Copilot reviewed 91 out of 93 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| vercel.json | Vercel build/install commands and env placeholders for apps/web. |
| turbo.json | Adds globalEnv so Turbo cache keys include key runtime env vars. |
| README.md | Adds Vercel deploy button + updated heading. |
| .prettierrc | Adds repo Prettier configuration. |
| .prettierignore | Adds Prettier ignore list for common build artifacts. |
| apps/web/package.json | Replaces placeholder tests with Vitest + adds Tailwind utilities and test deps. |
| apps/web/tsconfig.json | Tightens TS config and includes .next/types for Next typing. |
| apps/web/next.config.mjs | Adds standalone output, transpilePackages, image domains, and WASM webpack config. |
| apps/web/next-env.d.ts | Adds Next TypeScript ambient type references. |
| apps/web/vitest.config.ts | Adds Vitest config (jsdom + React plugin). |
| apps/web/vitest.setup.ts | Adds Testing Library jest-dom matchers setup. |
| apps/web/lib/utils.ts | Adds cn() helper using clsx + tailwind-merge. |
| apps/web/tests/lib/utils.test.ts | Adds unit tests for cn() behavior. |
| apps/web/hooks/useWasm.ts | Adds client hook to dynamically load WASM modules. |
| apps/web/public/manifest.json | Adds PWA manifest with icons + shortcuts. |
| apps/web/public/sw.js | Adds service worker implementing offline caching. |
| apps/web/components.json | Adds shadcn components config (replacing TS config). |
| apps/web/shadcn.config.ts | Removes broken shadcn TS config file. |
| apps/web/components/ui/Sidebar.tsx | Fixes broken JSX/className construction. |
| apps/web/components/ui/Card.tsx | Fixes broken JSX/className construction. |
| apps/web/components/flows/SocialAutomationFlow.tsx | Fixes invalid JSX expression by switching to template literal string. |
| apps/web/components/flows/GovernanceFlowDiagram.tsx | Fixes invalid JSX expression by switching to template literal string. |
| apps/web/components/flows/BuybackFlowDiagram.tsx | Fixes invalid JSX expression by switching to template literal string. |
| apps/web/components/flows/BuilderToProtocolMap.tsx | Fixes invalid JSX expression by switching to template literal string. |
| apps/web/app/layout.tsx | Adds Next Metadata/Viewport config and PWA-related head tags; tweaks sidebar visibility. |
| apps/web/app/admin/agents/page.tsx | Adds Admin “Agents” page scaffold. |
| apps/web/app/admin/treasury/page.tsx | Adds Admin “Treasury” page scaffold. |
| apps/web/app/admin/settings/page.tsx | Adds Admin “Settings” page scaffold. |
| apps/web/app/admin/audit/page.tsx | Adds Admin “Audit log” page scaffold. |
| apps/web/.env.example | Documents required env vars for local/dev and deployment. |
| packages/agents/package.json | Updates lint script to include TS extensions. |
| packages/agents/tsconfig.json | Adjusts include/exclude to avoid compiling tests in build output. |
| packages/agents/.eslintrc.json | Adds per-package ESLint config. |
| packages/agents/src/types.ts | Defines agent/swarm/task/message types. |
| packages/agents/src/agent.ts | Adds Agent base class with lifecycle + task result helpers. |
| packages/agents/src/swarm.ts | Adds Swarm orchestrator with dispatch/queue/broadcast primitives. |
| packages/agents/src/index.ts | Exports Agent/Swarm/types and concrete agents. |
| packages/agents/src/agents/pricing-agent.ts | Adds PricingAgent stub implementation. |
| packages/agents/src/agents/monitoring-agent.ts | Adds MonitoringAgent stub implementation. |
| packages/agents/src/agents/creation-agent.ts | Adds CreationAgent stub implementation. |
| packages/agents/src/tests/agent.test.ts | Adds Agent lifecycle and execution tests. |
| packages/agents/src/tests/swarm.test.ts | Adds Swarm registration/dispatch/queue tests. |
| packages/sdk/package.json | Updates lint script to include TS extensions. |
| packages/sdk/.eslintrc.json | Adds per-package ESLint config for SDK. |
| packages/sdk/wallet.ts | Marks previously-empty stub module as a valid TS module. |
| packages/sdk/profile.ts | Marks previously-empty stub module as a valid TS module. |
| packages/sdk/media.ts | Marks previously-empty stub module as a valid TS module. |
| packages/sdk/marketplace.ts | Marks previously-empty stub module as a valid TS module. |
| packages/sdk/l3.ts | Marks previously-empty stub module as a valid TS module. |
| packages/sdk/governance.ts | Marks previously-empty stub module as a valid TS module. |
| packages/sdk/game.ts | Marks previously-empty stub module as a valid TS module. |
| packages/sdk/fram.ts | Marks previously-empty stub module as a valid TS module. |
| packages/sdk/code.ts | Marks previously-empty stub module as a valid TS module. |
| packages/sdk/bridge.ts | Marks previously-empty stub module as a valid TS module. |
| packages/sdk/agents.ts | Marks previously-empty stub module as a valid TS module. |
| packages/sdk/src/plugins/types.ts | Defines plugin hook types and registry interface. |
| packages/sdk/src/plugins/registry.ts | Implements plugin registry registration, emit, and lifecycle helpers. |
| packages/sdk/src/plugins/analytics-plugin.ts | Adds AnalyticsPlugin implementation capturing emitted events. |
| packages/sdk/src/plugins/notification-plugin.ts | Adds NotificationPlugin implementation buffering notifications. |
| packages/sdk/src/plugins/index.ts | Exports plugin system entry points. |
| packages/sdk/src/tests/sdk.test.ts | Adds SDK export/module and plugin-system tests. |
| packages/indexer/package.json | Updates lint script to include TS extensions. |
| packages/indexer/.eslintrc.json | Adds per-package ESLint config. |
| packages/indexer/src/tests/indexer.test.ts | Adds basic “module loads” test. |
| packages/contracts/package.json | Removes incompatible hardhat-ethers v5 plugin; adds mocha/chai types. |
| packages/contracts/tsconfig.json | Includes hardhat.config.ts so Hardhat type augmentation resolves. |
| packages/contracts/hardhat.config.ts | Removes @nomiclabs/hardhat-ethers import. |
| packages/contracts/.solhint.json | Adds solhint configuration. |
| packages/contracts/contracts/social/SocialAutomationConfig.sol | Adds Solidity stub file for Hardhat sources discovery. |
| packages/contracts/contracts/social/FarcasterFrameRegistry.sol | Adds Solidity stub file for Hardhat sources discovery. |
| packages/contracts/contracts/marketplace/SponsorMarketplace.sol | Adds Solidity stub file for Hardhat sources discovery. |
| packages/contracts/contracts/marketplace/Marketplace.sol | Adds Solidity stub file for Hardhat sources discovery. |
| packages/contracts/contracts/marketplace/AuctionHouse.sol | Adds Solidity stub file for Hardhat sources discovery. |
| packages/contracts/contracts/l3/RollupFactory.sol | Adds Solidity stub file for Hardhat sources discovery. |
| packages/contracts/contracts/l3/L3Bridge.sol | Adds Solidity stub file for Hardhat sources discovery. |
| packages/contracts/contracts/governance/SubDAOFactory.sol | Adds Solidity stub file for Hardhat sources discovery. |
| packages/contracts/contracts/governance/GovernanceV2.sol | Adds Solidity stub file for Hardhat sources discovery. |
| packages/contracts/contracts/governance/AgentRegistry.sol | Adds Solidity stub file for Hardhat sources discovery. |
| packages/contracts/contracts/governance/AIDaoConstitution.sol | Adds Solidity stub file for Hardhat sources discovery. |
| packages/contracts/contracts/economy/SponsorToken.sol | Adds Solidity stub file for Hardhat sources discovery. |
| packages/contracts/contracts/economy/RevenueRouter.sol | Adds Solidity stub file for Hardhat sources discovery. |
| packages/contracts/contracts/economy/FeeManager.sol | Adds Solidity stub file for Hardhat sources discovery. |
| packages/contracts/contracts/economy/BuybackRouter.sol | Adds Solidity stub file for Hardhat sources discovery. |
| packages/contracts/contracts/core/UserProfile.sol | Adds Solidity stub file for Hardhat sources discovery. |
| packages/contracts/contracts/core/QuestToken.sol | Adds minimal token stub contract. |
| packages/contracts/contracts/core/MediaToken.sol | Adds Solidity stub file for Hardhat sources discovery. |
| packages/contracts/contracts/core/GameToken.sol | Adds Solidity stub file for Hardhat sources discovery. |
| packages/contracts/contracts/core/FramToken.sol | Adds Solidity stub file for Hardhat sources discovery. |
| packages/contracts/contracts/core/CodeToken.sol | Adds Solidity stub file for Hardhat sources discovery. |
| packages/contracts/contracts/core/CastToken.sol | Adds minimal token stub contract. |
| docs-site/package.json | Updates lint script to include TS/TSX/Vue extensions. |
| docs-site/.eslintrc.json | Adds per-site ESLint config. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| { | ||
| "root": true, | ||
| "parser": "@typescript-eslint/parser", | ||
| "extends": ["eslint:recommended"], | ||
| "env": { | ||
| "node": true, |
| { | ||
| "root": true, | ||
| "parser": "@typescript-eslint/parser", | ||
| "extends": ["eslint:recommended"], | ||
| "env": { |
| "overrides": [ | ||
| { | ||
| "files": ["**/*.ts", "**/*.tsx"], | ||
| "parser": "@typescript-eslint/parser", | ||
| "rules": { | ||
| "no-unused-vars": "off" | ||
| } | ||
| } |
packages/agents/src/swarm.ts
Outdated
| async dispatch(task: Task): Promise<TaskResult | null> { | ||
| const agent = this.routeTask(task); | ||
| if (!agent) { | ||
| return null; | ||
| } | ||
| return agent.execute(task); | ||
| } |
packages/sdk/src/plugins/registry.ts
Outdated
| unregister(name: string): void { | ||
| const plugin = this.plugins.get(name); | ||
| if (plugin) { | ||
| plugin.destroy().catch(console.error); | ||
| this.plugins.delete(name); | ||
| } |
apps/web/public/sw.js
Outdated
| const CACHE_NAME = 'castquest-v1'; | ||
| const STATIC_ASSETS = [ | ||
| '/', | ||
| '/manifest.json', | ||
| ]; |
| "overrides": [ | ||
| { | ||
| "files": ["**/*.ts", "**/*.tsx"], | ||
| "parser": "@typescript-eslint/parser", | ||
| "parserOptions": { | ||
| "ecmaVersion": 2020, | ||
| "sourceType": "module", | ||
| "ecmaFeatures": { "jsx": true } | ||
| } | ||
| } |
packages/agents/src/swarm.ts
Outdated
| async processQueue(): Promise<TaskResult[]> { | ||
| const results: TaskResult[] = []; | ||
| const maxConcurrency = this.config.maxConcurrency ?? 5; | ||
|
|
||
| while (this.taskQueue.length > 0 && this.running) { | ||
| const batch = this.taskQueue.splice(0, maxConcurrency); | ||
| const batchResults = await Promise.all( | ||
| batch.map((task) => this.dispatch(task)) | ||
| ); | ||
| results.push(...batchResults.filter((r): r is TaskResult => r !== null)); |
packages/sdk/src/plugins/registry.ts
Outdated
| register(plugin: PluginWithHooks): void { | ||
| if (this.plugins.has(plugin.name)) { | ||
| throw new Error(`Plugin "${plugin.name}" is already registered`); | ||
| } | ||
| this.plugins.set(plugin.name, plugin); | ||
| } |
apps/web/app/layout.tsx
Outdated
| return ( | ||
| <html lang='en' className='dark'> | ||
| <head> | ||
| <link rel='manifest' href='/manifest.json' /> |
|
@copilot apply changes based on the comments in this thread |
…gin async, layout a11y, sw.js strategy Co-authored-by: SMSDAO <144380926+SMSDAO@users.noreply.github.com>
Applied all changes from that review in commit
|
…S crash on Node 18) Co-authored-by: SMSDAO <144380926+SMSDAO@users.noreply.github.com>
|
All previous review feedback was already applied in Root cause: Fix: The Current status: lint ✅, typecheck ✅, 27 tests passing (13 agents, 8 SDK, 5 web, 1 indexer). Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
Pull request overview
This PR aims to make the CastQuest monorepo deployable and “production-ready” by adding Vercel/Turbo configuration, filling in previously-empty package entrypoints, introducing an SDK plugin system and an agents/swarm framework, and adding tests and web-app production assets (PWA + WASM + admin pages).
Changes:
- Add Vercel + Turborepo env configuration, plus repo-wide formatting config (Prettier) and eslint script updates.
- Implement new core package functionality:
@castquest/agents(Agent/Swarm + sample agents) and@castquest/sdkplugin system (Registry + sample plugins). - Add web production features and tests: Vitest config, PWA manifest + service worker, WASM hook, admin pages, and utility helpers.
Reviewed changes
Copilot reviewed 92 out of 94 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| vercel.json | Adds Vercel build/install commands and env placeholders for deploy. |
| turbo.json | Adds globalEnv entries for env-aware Turbo caching. |
| package.json | Adds @typescript-eslint/parser to root devDependencies. |
| README.md | Adds Vercel deploy button and updated heading. |
| .prettierrc | Introduces repo-wide Prettier formatting rules. |
| .prettierignore | Adds common generated/build outputs to ignore. |
| packages/sdk/package.json | Updates lint script to include TS/TSX extensions. |
| packages/sdk/.eslintrc.json | Adds package-level ESLint config with TS parser override. |
| packages/sdk/wallet.ts | Makes stub a valid TS module via export {}. |
| packages/sdk/media.ts | Makes stub a valid TS module via export {}. |
| packages/sdk/fram.ts | Makes stub a valid TS module via export {}. |
| packages/sdk/game.ts | Makes stub a valid TS module via export {}. |
| packages/sdk/code.ts | Makes stub a valid TS module via export {}. |
| packages/sdk/marketplace.ts | Makes stub a valid TS module via export {}. |
| packages/sdk/agents.ts | Makes stub a valid TS module via export {}. |
| packages/sdk/l3.ts | Makes stub a valid TS module via export {}. |
| packages/sdk/bridge.ts | Makes stub a valid TS module via export {}. |
| packages/sdk/governance.ts | Makes stub a valid TS module via export {}. |
| packages/sdk/profile.ts | Makes stub a valid TS module via export {}. |
| packages/sdk/src/plugins/types.ts | Defines plugin interfaces and hook types. |
| packages/sdk/src/plugins/registry.ts | Implements plugin registry (register/unregister/emit). |
| packages/sdk/src/plugins/analytics-plugin.ts | Adds sample analytics plugin capturing hook events. |
| packages/sdk/src/plugins/notification-plugin.ts | Adds sample notification plugin producing in-memory notifications. |
| packages/sdk/src/plugins/index.ts | Barrel exports for plugin system. |
| packages/sdk/src/tests/sdk.test.ts | Adds Vitest coverage for SDK exports and plugin system behavior. |
| packages/indexer/package.json | Updates lint script to include TS/TSX extensions. |
| packages/indexer/.eslintrc.json | Adds package-level ESLint config with TS parser. |
| packages/indexer/src/tests/indexer.test.ts | Adds basic Vitest module-load test for indexer. |
| packages/contracts/tsconfig.json | Includes hardhat.config.ts in TS compilation. |
| packages/contracts/package.json | Adjusts devDependencies (removes hardhat-ethers v2 plugin; adds types). |
| packages/contracts/hardhat.config.ts | Removes redundant @nomiclabs/hardhat-ethers import. |
| packages/contracts/.solhint.json | Adds Solhint default config. |
| packages/contracts/contracts/social/SocialAutomationConfig.sol | Adds placeholder contract file. |
| packages/contracts/contracts/social/FarcasterFrameRegistry.sol | Adds placeholder contract file. |
| packages/contracts/contracts/marketplace/SponsorMarketplace.sol | Adds placeholder contract file. |
| packages/contracts/contracts/marketplace/Marketplace.sol | Adds placeholder contract file. |
| packages/contracts/contracts/marketplace/AuctionHouse.sol | Adds placeholder contract file. |
| packages/contracts/contracts/l3/RollupFactory.sol | Adds placeholder contract file. |
| packages/contracts/contracts/l3/L3Bridge.sol | Adds placeholder contract file. |
| packages/contracts/contracts/governance/SubDAOFactory.sol | Adds placeholder contract file. |
| packages/contracts/contracts/governance/GovernanceV2.sol | Adds placeholder contract file. |
| packages/contracts/contracts/governance/AgentRegistry.sol | Adds placeholder contract file. |
| packages/contracts/contracts/governance/AIDaoConstitution.sol | Adds placeholder contract file. |
| packages/contracts/contracts/economy/SponsorToken.sol | Adds placeholder contract file. |
| packages/contracts/contracts/economy/RevenueRouter.sol | Adds placeholder contract file. |
| packages/contracts/contracts/economy/FeeManager.sol | Adds placeholder contract file. |
| packages/contracts/contracts/economy/BuybackRouter.sol | Adds placeholder contract file. |
| packages/contracts/contracts/core/UserProfile.sol | Adds placeholder contract file. |
| packages/contracts/contracts/core/QuestToken.sol | Adds minimal token stub contract. |
| packages/contracts/contracts/core/CastToken.sol | Adds minimal token stub contract. |
| packages/contracts/contracts/core/MediaToken.sol | Adds placeholder contract file. |
| packages/contracts/contracts/core/GameToken.sol | Adds placeholder contract file. |
| packages/contracts/contracts/core/FramToken.sol | Adds placeholder contract file. |
| packages/contracts/contracts/core/CodeToken.sol | Adds placeholder contract file. |
| packages/agents/package.json | Updates lint script to include TS/TSX extensions. |
| packages/agents/.eslintrc.json | Adds package-level ESLint config with TS parser. |
| packages/agents/tsconfig.json | Updates include/exclude to skip tests in build. |
| packages/agents/src/types.ts | Introduces agent/swarm/task types. |
| packages/agents/src/agent.ts | Implements base Agent class. |
| packages/agents/src/swarm.ts | Implements Swarm orchestration (dispatch/queue/messages). |
| packages/agents/src/index.ts | Exports agents framework public API. |
| packages/agents/src/agents/pricing-agent.ts | Adds sample PricingAgent implementation. |
| packages/agents/src/agents/monitoring-agent.ts | Adds sample MonitoringAgent implementation. |
| packages/agents/src/agents/creation-agent.ts | Adds sample CreationAgent implementation. |
| packages/agents/src/tests/agent.test.ts | Adds unit tests for Agent base behavior via PricingAgent. |
| packages/agents/src/tests/swarm.test.ts | Adds unit tests for Swarm basic orchestration behavior. |
| docs-site/package.json | Updates lint script to include TS/TSX/Vue extensions. |
| docs-site/.eslintrc.json | Adds docs-site ESLint config with TS override. |
| apps/web/package.json | Adds Tailwind/class utils deps and Vitest + Testing Library setup. |
| apps/web/next.config.mjs | Fixes config typing, enables standalone output, transpilePackages, WASM support. |
| apps/web/tsconfig.json | Improves Next TS config and includes .next/types. |
| apps/web/next-env.d.ts | Adds Next TypeScript reference file. |
| apps/web/vitest.config.ts | Adds Vitest config (jsdom + alias). |
| apps/web/vitest.setup.ts | Adds jest-dom matchers setup. |
| apps/web/lib/utils.ts | Adds cn() helper using clsx + tailwind-merge. |
| apps/web/hooks/useWasm.ts | Adds client hook for dynamic WASM module loading. |
| apps/web/public/manifest.json | Adds PWA manifest (name/theme/icons/shortcuts). |
| apps/web/public/sw.js | Adds service worker with cache-first for immutable assets and network-first otherwise. |
| apps/web/.env.example | Documents required env vars for local/dev deploy. |
| apps/web/components.json | Adds shadcn-ui components config. |
| apps/web/shadcn.config.ts | Removes shadcn config file (deleted). |
| apps/web/components/ui/Card.tsx | Fixes Card to merge className properly. |
| apps/web/components/ui/Sidebar.tsx | Fixes Sidebar client directive and link styling logic. |
| apps/web/components/flows/SocialAutomationFlow.tsx | Fixes preformatted diagram rendering. |
| apps/web/components/flows/GovernanceFlowDiagram.tsx | Fixes preformatted diagram rendering. |
| apps/web/components/flows/BuybackFlowDiagram.tsx | Fixes preformatted diagram rendering. |
| apps/web/components/flows/BuilderToProtocolMap.tsx | Fixes preformatted diagram rendering. |
| apps/web/app/layout.tsx | Uses typed Next metadata/viewport and updates manifest + responsive sidebar. |
| apps/web/app/admin/agents/page.tsx | Adds admin agent monitoring page UI. |
| apps/web/app/admin/treasury/page.tsx | Adds admin treasury dashboard page UI. |
| apps/web/app/admin/settings/page.tsx | Adds admin settings page UI. |
| apps/web/app/admin/audit/page.tsx | Adds admin audit log page UI. |
| apps/web/tests/lib/utils.test.ts | Adds tests for cn() utility. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
packages/agents/src/swarm.ts
Outdated
| private routeTask(_task: Task): Agent | undefined { | ||
| const agentsList = Array.from(this.agents.values()); | ||
| const available = agentsList.filter((a) => a.getStatus() === 'idle'); | ||
| if (available.length === 0) return agentsList[0]; | ||
| return available[0]; |
| constructor(config: SwarmConfig) { | ||
| this.config = config; | ||
| } |
| export interface SwarmConfig { | ||
| name: string; | ||
| agents: AgentConfig[]; | ||
| maxConcurrency?: number; | ||
| messageBusSize?: number; | ||
| } |
packages/agents/src/types.ts
Outdated
| export interface Plugin { | ||
| name: string; | ||
| version: string; | ||
| init(_registry: unknown): Promise<void>; | ||
| destroy(): Promise<void>; | ||
| } |
| "icons": [ | ||
| { | ||
| "src": "/icons/icon-192.png", | ||
| "sizes": "192x192", | ||
| "type": "image/png", | ||
| "purpose": "maskable any" | ||
| }, | ||
| { | ||
| "src": "/icons/icon-512.png", | ||
| "sizes": "512x512", | ||
| "type": "image/png", | ||
| "purpose": "maskable any" | ||
| } | ||
| ], |
There was a problem hiding this comment.
Pull request overview
This PR aims to move the CastQuest monorepo from a skeleton state toward a deployable, production-oriented setup by adding Vercel/Turbo build configuration, implementing initial Agents + SDK plugin frameworks, and adding baseline web app utilities/PWA assets and tests.
Changes:
- Add Vercel + Turborepo environment configuration for monorepo builds.
- Implement
packages/agents(Agent/Swarm + example agents) andpackages/sdkplugin registry/plugins, plus basic tests. - Add
apps/webPWA assets (manifest + service worker), utilities/hooks, and Vitest configuration/tests.
Reviewed changes
Copilot reviewed 92 out of 94 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| vercel.json | Adds Vercel build/install/output + env configuration for monorepo deploys. |
| turbo.json | Adds globalEnv so Turbo cache keys include required env vars. |
| packages/sdk/wallet.ts | Makes stub a valid module via export {}. |
| packages/sdk/profile.ts | Makes stub a valid module via export {}. |
| packages/sdk/media.ts | Makes stub a valid module via export {}. |
| packages/sdk/marketplace.ts | Makes stub a valid module via export {}. |
| packages/sdk/l3.ts | Makes stub a valid module via export {}. |
| packages/sdk/governance.ts | Makes stub a valid module via export {}. |
| packages/sdk/game.ts | Makes stub a valid module via export {}. |
| packages/sdk/fram.ts | Makes stub a valid module via export {}. |
| packages/sdk/code.ts | Makes stub a valid module via export {}. |
| packages/sdk/bridge.ts | Makes stub a valid module via export {}. |
| packages/sdk/agents.ts | Makes stub a valid module via export {}. |
| packages/sdk/package.json | Updates lint command to include TS/TSX extensions; enables Vitest script. |
| packages/sdk/.eslintrc.json | Adds package-local ESLint config with TS parser override. |
| packages/sdk/src/plugins/types.ts | Introduces plugin + hook type system and registry interface. |
| packages/sdk/src/plugins/registry.ts | Implements plugin registry (register/unregister/emit + init/destroy all). |
| packages/sdk/src/plugins/analytics-plugin.ts | Adds sample analytics plugin capturing hook events. |
| packages/sdk/src/plugins/notification-plugin.ts | Adds sample notification plugin with queue + handler. |
| packages/sdk/src/plugins/index.ts | Re-exports plugin system public surface. |
| packages/sdk/src/tests/sdk.test.ts | Adds SDK module + plugin system unit tests. |
| packages/indexer/package.json | Updates lint command to include TS/TSX extensions. |
| packages/indexer/.eslintrc.json | Adds package-local ESLint config using TS parser. |
| packages/indexer/src/tests/indexer.test.ts | Adds basic indexer module load test. |
| packages/contracts/tsconfig.json | Includes hardhat.config.ts in TS compilation inputs. |
| packages/contracts/package.json | Adjusts dev deps (removes @nomiclabs/hardhat-ethers, adds mocha/chai types). |
| packages/contracts/hardhat.config.ts | Removes @nomiclabs/hardhat-ethers import (toolbox already covers). |
| packages/contracts/.solhint.json | Adds default Solhint configuration. |
| packages/contracts/contracts/social/SocialAutomationConfig.sol | Adds placeholder Solidity source unit. |
| packages/contracts/contracts/social/FarcasterFrameRegistry.sol | Adds placeholder Solidity source unit. |
| packages/contracts/contracts/marketplace/SponsorMarketplace.sol | Adds placeholder Solidity source unit. |
| packages/contracts/contracts/marketplace/Marketplace.sol | Adds placeholder Solidity source unit. |
| packages/contracts/contracts/marketplace/AuctionHouse.sol | Adds placeholder Solidity source unit. |
| packages/contracts/contracts/l3/RollupFactory.sol | Adds placeholder Solidity source unit. |
| packages/contracts/contracts/l3/L3Bridge.sol | Adds placeholder Solidity source unit. |
| packages/contracts/contracts/governance/SubDAOFactory.sol | Adds placeholder Solidity source unit. |
| packages/contracts/contracts/governance/GovernanceV2.sol | Adds placeholder Solidity source unit. |
| packages/contracts/contracts/governance/AgentRegistry.sol | Adds placeholder Solidity source unit. |
| packages/contracts/contracts/governance/AIDaoConstitution.sol | Adds placeholder Solidity source unit. |
| packages/contracts/contracts/economy/SponsorToken.sol | Adds placeholder Solidity source unit. |
| packages/contracts/contracts/economy/RevenueRouter.sol | Adds placeholder Solidity source unit. |
| packages/contracts/contracts/economy/FeeManager.sol | Adds placeholder Solidity source unit. |
| packages/contracts/contracts/economy/BuybackRouter.sol | Adds placeholder Solidity source unit. |
| packages/contracts/contracts/core/UserProfile.sol | Adds placeholder Solidity source unit. |
| packages/contracts/contracts/core/MediaToken.sol | Adds placeholder Solidity source unit. |
| packages/contracts/contracts/core/GameToken.sol | Adds placeholder Solidity source unit. |
| packages/contracts/contracts/core/FramToken.sol | Adds placeholder Solidity source unit. |
| packages/contracts/contracts/core/CodeToken.sol | Adds placeholder Solidity source unit. |
| packages/contracts/contracts/core/QuestToken.sol | Adds minimal token metadata contract stub. |
| packages/contracts/contracts/core/CastToken.sol | Adds minimal token metadata contract stub. |
| packages/agents/tsconfig.json | Tweaks include/exclude to avoid compiling tests into dist. |
| packages/agents/package.json | Updates lint command to include TS/TSX extensions. |
| packages/agents/.eslintrc.json | Adds package-local ESLint config using TS parser. |
| packages/agents/src/types.ts | Adds core agent/swarm/task type definitions. |
| packages/agents/src/agent.ts | Adds base Agent abstraction and result helpers. |
| packages/agents/src/swarm.ts | Adds Swarm orchestration (dispatch, queue processing, messaging). |
| packages/agents/src/index.ts | Exports agents framework public API. |
| packages/agents/src/agents/pricing-agent.ts | Adds example PricingAgent implementation. |
| packages/agents/src/agents/monitoring-agent.ts | Adds example MonitoringAgent implementation. |
| packages/agents/src/agents/creation-agent.ts | Adds example CreationAgent implementation. |
| packages/agents/src/tests/agent.test.ts | Adds tests for base Agent behavior via PricingAgent. |
| packages/agents/src/tests/swarm.test.ts | Adds tests for Swarm registration/dispatch/queue processing. |
| package.json | Adds @typescript-eslint/parser to root devDependencies. |
| docs-site/package.json | Updates lint command to include TS/TSX/Vue extensions. |
| docs-site/.eslintrc.json | Adds docs-site ESLint config with TS overrides. |
| apps/web/package.json | Replaces placeholder test script with Vitest; adds Tailwind + testing deps. |
| apps/web/vitest.config.ts | Adds Vitest config (node environment) and alias. |
| apps/web/vitest.setup.ts | Adds jest-dom matcher setup file. |
| apps/web/tsconfig.json | Refines TS config (includes .next/types, adds Next plugin). |
| apps/web/next-env.d.ts | Adds Next TypeScript reference file. |
| apps/web/next.config.mjs | Enables standalone output, transpilePackages, image domains, WASM support. |
| apps/web/public/manifest.json | Adds PWA manifest definition. |
| apps/web/public/sw.js | Adds service worker with cache-first static assets + network-first HTML/API. |
| apps/web/lib/utils.ts | Adds cn() utility (clsx + tailwind-merge). |
| apps/web/hooks/useWasm.ts | Adds hook to lazy-load WASM modules on mount. |
| apps/web/components.json | Adds ShadCN components configuration. |
| apps/web/shadcn.config.ts | Removes prior shadcn config (now using components.json). |
| apps/web/components/ui/Card.tsx | Fixes className composition to include provided className. |
| apps/web/components/ui/Sidebar.tsx | Fixes corrupted className string and closing brace; sidebar nav rendering. |
| apps/web/components/flows/SocialAutomationFlow.tsx | Fixes <pre> rendering via template literal. |
| apps/web/components/flows/GovernanceFlowDiagram.tsx | Fixes <pre> rendering via template literal. |
| apps/web/components/flows/BuybackFlowDiagram.tsx | Fixes <pre> rendering via template literal. |
| apps/web/components/flows/BuilderToProtocolMap.tsx | Fixes <pre> rendering via template literal. |
| apps/web/app/layout.tsx | Switches to typed Next Metadata/Viewport; sets manifest + Apple PWA metadata; improves zoom accessibility by removing max scale restriction; hides sidebar on mobile. |
| apps/web/app/admin/treasury/page.tsx | Adds admin treasury placeholder UI page. |
| apps/web/app/admin/settings/page.tsx | Adds admin settings placeholder UI page. |
| apps/web/app/admin/audit/page.tsx | Adds admin audit log placeholder UI page. |
| apps/web/app/admin/agents/page.tsx | Adds admin agent monitoring placeholder UI page. |
| apps/web/tests/lib/utils.test.ts | Adds unit tests for cn() utility. |
| apps/web/.env.example | Documents required environment variables for web app. |
| README.md | Adds Vercel deploy button + updated heading. |
| .prettierrc | Adds repo-wide Prettier configuration. |
| .prettierignore | Adds repo-wide Prettier ignore rules. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| environment: 'node', | ||
| globals: true, |
| "devDependencies": { | ||
| "@testing-library/jest-dom": "^6.9.1", | ||
| "@testing-library/react": "^16.3.2", | ||
| "@types/node": "^20.10.0", | ||
| "@types/react": "^18.2.45", | ||
| "@types/react-dom": "^18.2.18", | ||
| "typescript": "^5.0.0", | ||
| "@vitejs/plugin-react": "^4.2.1", | ||
| "autoprefixer": "^10.4.27", | ||
| "eslint": "^8.55.0", | ||
| "eslint-config-next": "14.0.0" | ||
| "eslint-config-next": "14.0.0", | ||
| "jsdom": "^28.1.0", | ||
| "postcss": "^8.5.8", | ||
| "tailwindcss": "^3.4.19", | ||
| "typescript": "^5.0.0", | ||
| "vitest": "^1.0.4" |
| "use client"; | ||
|
|
||
| import Link from "next/link"; | ||
| import { usePathname } from "next/navigation"; |
| "framework": "nextjs", | ||
| "installCommand": "pnpm install", | ||
| "buildCommand": "pnpm --filter @castquest/web build", | ||
| "outputDirectory": "apps/web/.next", |
| @@ -1,3 +1,7 @@ | |||
| ## 🚀 CASTQUEST V3 — Autonomous Multi-Chain Creative Economy | |||
|
|
|||
| [](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FCastQuest%2Fcast&root-directory=apps/web) | |||
packages/agents/src/swarm.ts
Outdated
| private routeTask(_task: Task): Agent | undefined { | ||
| const agentsList = Array.from(this.agents.values()); | ||
| const available = agentsList.filter((a) => a.getStatus() === 'idle'); | ||
| if (available.length === 0) return agentsList[0]; | ||
| return available[0]; |
| async unregister(name: string): Promise<void> { | ||
| const plugin = this.plugins.get(name); | ||
| if (plugin) { | ||
| this.plugins.delete(name); | ||
| await plugin.destroy(); | ||
| } |
…nts + Plugin, add PWA icons Co-authored-by: SMSDAO <144380926+SMSDAO@users.noreply.github.com>
|
Applied all review 2 feedback in
Status: lint ✅, typecheck ✅, 28 tests passing (14 agents, 8 SDK, 5 web, 1 indexer), CodeQL 0 alerts. |
@typescript-eslint/parserto root devDependencies@typescript-eslint/parserto root devDependenciesSwarm.dispatch()returns error TaskResult when no agents availableSwarm.processQueue()pairs one task per idle agentRegistry.register()async + auto-initRegistry.unregister()returns Promise and awaits destroy()routeTask()to returnundefinedwhen no idle agents (was returning first busy agent)SwarmConfig.agentsfield from types.tsPlugininterface from packages/agents/src/types.tspublic/icons/icon-192.png,public/icons/icon-512.png)Original prompt
Objective
Transform the CastQuest/cast monorepo from its current documentation-heavy/skeleton state into a fully production-ready, deployable application with all missing production parts implemented. The web app at
apps/webcurrently only has barebones Next.js 14 withnext,react,react-dom— no UI library, no wallet integration, no tests, no deploy config. This PR must implement ALL of the following across the monorepo.Current State (from repo analysis)
apps/web,packages/{agents,contracts,sdk,indexer},docs-site,infra)next@14.0.0,react@18.2.0,react-dom@18.2.0— NO Tailwind, NO ShadCN, NO wallet libs"test": "echo 'Tests will be added in future updates' && exit 0"vercel.json, no deploy buttonP0 — Vercel One-Click Deploy + Production Build
Add
vercel.jsonat repo root:apps/webas the build targetframework: "nextjs",installCommand: "pnpm install",buildCommand: "pnpm --filter @castquest/web build"outputDirectory: "apps/web/.next"Add "Deploy to Vercel" button in
README.md:Create/update
apps/web/next.config.js(or.mjs):experimental.serverActionsif neededimages.domainsfor external assetsoutput: 'standalone'for productiontranspilePackagesfor monorepo internal packagesCreate
apps/web/.env.examplewith all required env vars documentedP1 — UI Foundation: Tailwind + ShadCN + RainbowKit
Add Tailwind CSS to
apps/web:tailwindcss,postcss,autoprefixerto devDependenciestailwind.config.tswith content paths for the monorepopostcss.config.jsapps/web/app/globals.cssAdd ShadCN UI components:
@radix-ui/react-*primitives,class-variance-authority,clsx,tailwind-merge,lucide-reactapps/web/lib/utils.tswithcn()helperapps/web/components/ui/directory with essential components:button.tsx,card.tsx,input.tsx,dialog.tsx,dropdown-menu.tsx,navigation-menu.tsx,sheet.tsx,tabs.tsx,badge.tsx,avatar.tsx,toast.tsx,skeleton.tsx,table.tsxcomponents.jsonconfig for ShadCNAdd RainbowKit + wagmi + viem:
@rainbow-me/rainbowkit,wagmi,viem,@tanstack/react-querytoapps/webdependenciesapps/web/lib/wagmi.ts— configure chains (Base, Base Sepolia, Ethereum mainnet, Polygon, Arbitrum)apps/web/providers/Web3Provider.tsx— wrap app withWagmiProvider,QueryClientProvider,RainbowKitProviderapps/web/components/ConnectButton.tsx— custom styled connect button using RainbowKitapps/web/app/layout.tsxP2 — Modern Admin Dashboard UI
apps/web/app/admin/:apps/web/app/admin/layout.tsx— sidebar navigation, top bar, responsiveapps/web/app/admin/page.tsx— Overview dashboard with metric cards (TVL, Volume, Users, Agents Active)apps/web/app/admin/agents/page.tsx— Agent monitoring panel with status tableapps/web/app/admin/treasury/page.tsx— Treasury overview with charts placeholderapps/web/app/admin/settings/page.tsx— System settings panelapps/web/app/admin/audit/page.tsx— Audit log viewerdark:classesP2 — Mobile-First User UI (Ultra Advanced Mobile Web App)
Create user-facing pages under
apps/web/app/:apps/web/app/page.tsx— Landing/home page with hero, feature grid, CTAapps/web/app/marketplace/page.tsx— Marketplace listing grid with filtersapps/web/app/quests/page.tsx— Quest board with quest cardsapps/web/app/profile/page.tsx— User profile with wallet, assets, activityapps/web/app/frames/page.tsx— Frame gallery/builder entryPWA Configuration:
apps/web/public/manifest.jsonwith app name "CastQuest", icons, theme color,display: "standalone"apps/web/public/sw.js— basic service worker for offline cachin...This pull request was created from Copilot chat.
📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.